]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
networkAgent: Only unregister if we've registered
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 8 Dec 2012 07:41:20 +0000 (02:41 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 12 Dec 2012 11:35:46 +0000 (06:35 -0500)
It's possible to turn auto_register back on, but not immediately be
registered. Don't cause a (harmless) critical in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=689884

js/ui/components/networkAgent.js

index d1c984643b6fbbef820513301ed56dd0070002fe..e214cd87c3487d56504e6e57a17d61be00106693 100644 (file)
@@ -613,7 +613,8 @@ const NetworkAgent = new Lang.Class({
         this._vpnRequests = { };
 
         this._native.auto_register = false;
-        this._native.unregister();
+        if (this._native.registered)
+            this._native.unregister();
     },
 
     _newRequest:  function(agent, requestId, connection, settingName, hints, flags) {